/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 头部区域 */
.news-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    padding: 5px 20px;
    background-color: #f5f5f5;
    font-size: 14px;
    color: #666;
}

.logo-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.site-name {
    color: #c00;
    font-size: 28px;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-bar {
    display: flex;
    width: 300px;
}

.search-bar input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-right: none;
    outline: none;
}

.search-bar button {
    padding: 8px 15px;
    background-color: #c00;
    color: white;
    border: none;
    cursor: pointer;
}

.login-btn {
    padding: 8px 20px;
    background-color: transparent;
    border: 1px solid #c00;
    color: #c00;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.login-btn:hover {
    background-color: #c00;
    color: white;
}

.main-nav {
    background-color: #c00;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    padding: 15px 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.main-nav li:hover, .main-nav li.active {
    background-color: #a00;
}

/* 主要内容区 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    flex: 1;
}

.main-content {
    flex: 2;
    margin-right: 30px;
}

/* 头条新闻 */
.headline-news {
    display: flex;
    margin-bottom: 30px;
    gap: 20px;
}

.main-headline {
    flex: 2;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.main-headline img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s;
}

.main-headline:hover img {
    transform: scale(1.03);
}

.headline-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
}

.headline-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.headline-content p {
    margin-bottom: 10px;
    opacity: 0.9;
}

.news-time {
    font-size: 14px;
    opacity: 0.8;
}

.sub-headlines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sub-headline {
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.sub-headline:hover {
    transform: translateY(-5px);
}

.sub-headline h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* 新闻分类区块 */
.news-section {
    margin-bottom: 40px;
}

.section-title {
    border-left: 4px solid #c00;
    padding-left: 10px;
    font-size: 22px;
    margin-bottom: 20px;
}

/* 新增混合新闻列表样式 */
.mixed-news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.text-news-item {
    flex: 1 1 calc(20% - 20px);
    min-width: 200px;
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.text-news-item:hover {
    transform: translateY(-5px);
}

.text-news-item h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.text-news-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
}

.image-news-item {
    flex: 1 1 calc(100% - 20px);
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.image-news-item:hover {
    transform: translateY(-5px);
}

.image-news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-news-info {
    padding: 15px;
}

.image-news-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.image-news-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.image-news-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 13px;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination a {
    color: #333;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination a.active {
    background-color: #c00;
    color: white;
}

.pagination a:hover:not(.active) {
    background-color: #f1f1f1;
}

/* 侧边栏 */
.sidebar {
    flex: 1;
}

.sidebar-widget {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.hot-topics ol {
    list-style: none;
}

.hot-topics li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
}

.hot-topics li:before {
    content: counter(item) ".";
    counter-increment: item;
    font-weight: bold;
    color: #c00;
    margin-right: 10px;
    min-width: 20px;
}

.hot-topics {
    counter-reset: item;
}

.live-item {
    margin-bottom: 15px;
}

.live-item img {
    border-radius: 5px;
    margin-bottom: 10px;
}

.live-item p {
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .main-content {
        margin-right: 0;
        margin-bottom: 30px;
    }

    .headline-news {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .logo-area {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
        margin-top: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .search-bar {
        width: 100%;
    }

    .login-btn {
        width: 100%;
        text-align: center;
    }

    .main-nav ul {
        flex-wrap: wrap;
    }

    .main-nav li {
        padding: 10px 15px;
    }

    .text-news-item {
        flex: 1 1 calc(50% - 20px);
    }

    .image-news-item {
        flex: 1 1 calc(100% - 20px);
    }
}

/* 底部区域 - 精简版 */
.news-footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.footer-links a {
    color: #ccc;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 14px;
    color: #999;
}